package com.gome.spiderkit.model;

import java.io.IOException;
import java.util.List;

import org.apache.zookeeper.KeeperException;

import com.gome.spiderkit.data.SpiderkitInfoConnection;
import com.google.protobuf.InvalidProtocolBufferException;


public class GroupSummary {
	String zkhost;
	List<GroupItem> groupList;
	int nullGroupSize = 0;
	
	public int getNullGroupSize() {
		return nullGroupSize;
	}

	public void setNullGroupSize(int nullGroupSize) {
		this.nullGroupSize = nullGroupSize;
	}

	public GroupSummary(String zkhost) {
		this.zkhost = zkhost;
	}

	public String getZkhost() {
		return zkhost;
	}
	
	public void setZkhost(String zkhost) {
		this.zkhost = zkhost;
	}

	public List<GroupItem> getGroupList() {
		return groupList;
	}

	public void setGroupList(List<GroupItem> groupList) {
		this.groupList = groupList;
	}
	
	public GroupItem getGroupItem(String gname) {
		for (int i = 0; i < this.groupList.size(); i ++) {
			if (this.groupList.get(i).getGroupName().equals(gname))
				return this.groupList.get(i);
		}
		return null;
	}
}
